<script setup>
import GreenhousePage from "@/pages/GreenhousePage.vue";
import LoginPage from "@/pages/LoginPage.vue";
import {ref} from "vue";

const alreadyLogin = ref(false);
const loginSuccess = () => {
  alreadyLogin.value = true;
}
</script>

<template>
  <div class="app-out">
    <GreenhousePage v-if="alreadyLogin"/>
    <LoginPage v-else @login-event="loginSuccess"/>
  </div>
</template>

<style scoped>
.app-out {
  width: 100vw;
  height: 100vh;
  background: #eeeeee;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
